package com.yang.booking.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yang.booking.pojo.Course;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface CourseMapper extends BaseMapper<Course> {

    @Select("select c.* from Course c inner join Score s on c.c_id = s.c_id where s.s_id = #{sId}")
    List<Course> queryCourseList(String sId);

    @Select("select c.* from Course c inner join Teacher t on c.t_id = t.t_id where t.t_id = #{tId}")
    List<Course> queryCourses(String tId);

}
